#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QFileDialog>
#include <QDir>
#include <QMessageBox>
#include <QDebug>
#include "checkformatthread.h"
#include "dealpandata.h"
#include "drawcurvewindow.h"
#include <QTimer>
#include "mauvedata.h"
#include "dealmauveandgenomethread.h"
#include "paintmauveimagethread.h"
#include "imagedata.h"
#include "drawblockwindow.h"


namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

public slots:
    void on_buttonSelectFile_clicked();
    void on_cbPanFileType_currentIndexChanged(int index);
    void panFileFormatChecked(bool isLegal);
    void dealDMAGThreadError(QString error);
    //void testMDReceiving(MauveData mData);
    void createMainImage(MauveData mData);
    //void drawMainImage(ImageData iData);

private slots:
    void on_buttonRun_clicked();

    void on_buttonSelectMauve_clicked();

    void on_buttonSelectGenomeName_clicked();

    void on_buttonRunMauve_clicked();

    void updateDiandianState();

    void on_buttonMauveProcessingCancel_clicked();

private:
    Ui::MainWindow *ui;
    int filetype;
    QString filename;
    QString mauveFilePath;
    QString genomeNameFilePath;
    int genomeNumberInMauve;


    int checkMauveFileFormat();
    void MauveFileFormatChecked(int formatType);
    void genomeNameFileChecked();
    void isMauveFileProcessing(bool b);
    void mauvePartVeryBeginingState();

    void everyWidgetEnableExceptMauveCancel(bool b);


    QVector<QThread> runningThread;


};

#endif // MAINWINDOW_H
